<?php
require('config.php');
		$user_id=$_REQUEST['user_id'];
        $user_name=$_REQUEST['user_name'];
        $user_mobile=$_REQUEST['user_mobile'];
        $address1=$_REQUEST['address1'];
        $address2=$_REQUEST['address2'];
        $address3=$_REQUEST['address3'];
        $address4=$_REQUEST['address4'];
        $jiedao=$_REQUEST['jiedao'];
        $address_id=$_REQUEST['address_id'];
        $time=date('Y-m-d H:i:s');
		// $sql="select * from `".$oto."_user_address` where `userId`='".$user_id."'";
		// $result=$db->query($sql);
		// while($row=$result->fetch_assoc()){
		// 	$user_address[]=$row;//将取得的所有数据赋值给person_info数组
		// }
		$sql="update ".$oto."_user_address set userName='{$user_name}',userPhone='{$user_mobile}',areaId1='{$address1}',areaId2='{$address2}',areaId3='{$address3}',communityId='{$address4}',address='{$jiedao}' where userId='{$user_id}' and addressId='{$address_id}'";
		$result=$db->query($sql);
		if($result)
		{
			$data[0]['pan']=1;
		}
		else
		{
			$data[0]['pan']=0;
		}
		echo json_encode($data);
?>
